Beyond Cmax: an optimization-oriented framework for constraint-based scheduling
نویسندگان
چکیده
This paper presents a framework taking advantage of both the flexibility of constraint programming and the efficiency of operations research algorithms for solving scheduling problems under various objectives and constraints. Built upon a constraint programming engine, the framework allows the use of scheduling global constraints, and it offers, in addition, a modular and simplified way to perform optimality reasoning based on well-known scheduling relaxations. We present a first instantiation on the single machine problem with release dates and lateness minimization. Beyond the simplicity of use, the optimizationoriented framework appears to be, from the experiments, effective for dealing with such a pure problem even without any ad-hoc heuristics. Key-words: Combinatorial optimization; Artificial intelligence; Constraints satisfaction; Scheduling 1 Univ. Nice Sophia Antipolis, CNRS, I3S, UMR 7271, 06900 Sophia Antipolis, France – [email protected], [email protected] 2 TASC project, Mines Nantes-INRIA, LINA CNRS UMR 6241 – [email protected] ha l-0 09 76 99 4, v er si on 1 10 A pr 2 01 4 Beyond Cmax: an optimization-oriented framework for constraint-based scheduling Arnaud Malapert1, Sophie Demassey2, and Jean-Charles Régin1 1 I3S CNRS UMR 7271, UNSA 2 TASC project, Mines Nantes-INRIA, LINA CNRS UMR 6241, {firstname.lastname@{unice,mines-nantes}.fr Abstract. This paper presents a framework taking advantage of both the flexibility of constraint programming and the efficiency of operations research algorithms for solving scheduling problems under various objectives and constraints. Built upon a constraint programming engine, the framework allows the use of scheduling global constraints, and it offers, in addition, a modular and simplified way to perform optimality reasoning based on well-known scheduling relaxations. We present a first instantiation on the single machine problem with release dates and lateness minimization. Beyond the simplicity of use, the optimizationoriented framework appears to be, from the experiments, effective for dealing with such a pure problem even without any ad-hoc heuristics. This paper presents a framework taking advantage of both the flexibility of constraint programming and the efficiency of operations research algorithms for solving scheduling problems under various objectives and constraints. Built upon a constraint programming engine, the framework allows the use of scheduling global constraints, and it offers, in addition, a modular and simplified way to perform optimality reasoning based on well-known scheduling relaxations. We present a first instantiation on the single machine problem with release dates and lateness minimization. Beyond the simplicity of use, the optimizationoriented framework appears to be, from the experiments, effective for dealing with such a pure problem even without any ad-hoc heuristics. All scheduling problems are defined by specific combinations of resource environments, job characteristics, objectives and side constraints which make them all slightly different to solve and most of them highly combinatorial. A standard approach for solving a given practical scheduling problem is to adapt and combine different algorithms (relaxations, heuristics, search algorithms) that have been designed for simpler mathematical models. As the peculiar aspects of the problem are rarely compatible with these algorithms, they are simply ignored during the solution process to be heuristically repaired afterwards. This results in complex developments of a non-exact solution method dedicated to one problem. As an alternative, a constraint programming (CP) engine lets the user specify the different components of his problem separately, then automatically solves the components jointly. The efficiency of the engine strongly depends on the management of each independent component. In the context of scheduling, attention has been paid on temporal networks [1] and, mainly, on resource conflicts given various filtering algorithms (edge-finding, not first/not last, etc) for disjunctive and cumulative constraints [2]. These algorithms are mostly effective when minimizing the makespan, i.e. the schedule duration. However, makespan minimization is not a realistic criterion in many contexts where other objective functions, like the maximum lateness, the total tardiness or the weighted sum of the completion times, are preferred in practice [3]. Such regular objectives may be set as additional constraints and variables in the model, but no effective propagation can be obtained without considering the resource constraints and the temporal ha l-0 09 76 99 4, v er si on 1 10 A pr 2 01 4 2 A. Malapert, S. Demassey, J.-C. Régin contraints at the same time. This is probably the main limitation of current CP systems to their wide application to practical scheduling [4]. Our goal is to design a generic constraint-based scheduling framework, combining the flexibility of CP for specifying complex scheduling problems with various objectives and constraints, with the efficiency of ad-hoc branch-andbound (B&B) algorithms for solving the simplest models. These algorithms include accelerating features such as (for a minimization criterion): (i) relaxations computing tight lower bounds at each node, (ii) filtering techniques discarding either infeasible or sub-optimal decisions, (iii) branching strategies guided by the relaxed solutions and impacting on them from one node to its child, and (iv) heuristics computing upper bounds and feasible solutions, at the root node only or during the search. These features are not standard in CP-based B&B which are thus recognized to be weak for solving optimization problems in general. The concept of using relaxations for integrating features (i) to (iii) has been examined by Focacci et al. [5]. They show how to exploit relaxed optima in CP-B&B for node pruning, domain filtering (also called back-propagation), and search guiding. This approach has been fully applied to only few applications in the current literature but since, back-propagation algorithms have demonstrated their benefit when a convenient relaxation of a problem exists. In the context of scheduling, several back-propagation algorithms have been applied to specific problems with different optimality criteria, either for sum objectives, e.g. weighted number of late jobs [6], total set-up times [5], total tardiness [7], total earliness/tardiness [8, 9], total weighted completion time [10, 11], or for bottleneck objectives, e.g. maximum lateness [12]. The unifying framework we propose aims at taking advantage of the genericity of the full approach introduced by [5]. It is especially applicable to scheduling problems for several reasons. From the user perspective, there exist libraries of relaxations and algorithms (e.g. [3, 13, 14]) which could be queried either manually or automatically to be integrated in the framework. Furthermore, each relaxation remains valid for various problems with different resource and job characteristics. Finally, from the solver perspective, most of these algorithms, especially priority list algorithms, offer all the features required (e.g. low complexity and incrementality) to make the approach fully effective. To our knowledge, no generic implementation of [5] has been proposed so far. The Aeon system [15] provides a high-level modeling library and solvers for scheduling problems, but it does not integrate this approach in a systematic way. Our framework can be seen as a possible extension to this generic-purpose system. Our first contribution, described in Section 1 of this paper, is a customizable, modular and compositional template offering optimality reasoning functions to any CP-B&B: the user specifies an algorithm for solving a relaxation of his core problem, then the system automatically derives altogether basic bounding, filtering (by probing) and search guiding (e.g. with regrets) techniques. The user can also easily adapt these default functions to make them more effective with his specific relaxation. To validate the framework, we present in Section 2 a first instantiation on the single machine problem with release dates and lateness minha l-0 09 76 99 4, v er si on 1 10 A pr 2 01 4 Beyond Cmax: constraint optimization-based scheduling 3 imization (1|rj |Lmax) (see e.g. [16]) by implementing two standard relaxations. This application confirms the simplicity of implementation offered by the framework, while the experimental results given in Section 3 show its effectiveness. In the future, we envisage to test models of other scheduling problems either based on the same relaxations or requiring to implement new ones for different objectives. Compared to ad-hoc solution methods for pure scheduling models, which are mostly based on powerful meta-heuristics, we will also conduct a study about the integration of heuristics in our generic framework. 1 The Optimization-oriented Framework Relaxations in CP-based B&B. Pruning mostly derives from feasibility reasoning. When coping with an optimization problems with a B&B algorithm, pruning must also proceed from optimality reasoning: Pruning a node means to discard from the search a subset that contains no solution whose cost is better than the current incumbent, i.e. the value of the best solution found so far. This can be detected by solving a relaxation of the subproblem: the corresponding node is pruned if the optimum of the relaxation equals or exceeds the incumbent. Cost-based filtering allows to prevent such a thrash early, by removing variablevalue assignments which do not lead to solutions better than the incumbent. A sub-optimal assignment is detected by estimating its extra-cost to the optimum when added to the relaxation and, again, by comparing it to the incumbent. Cost-guided branching aims at minimizing the size of the tree with strategies that select the next branching according to the relaxed optima and solutions. These are state-of-the-art techniques of integer linear programming solvers. In contrast, they have received few attention in CP, one notable exception being regret-based strategies. Relaxation-based heuristics can be run at each node of the search to derive a feasible solution from a relaxed solution. When an improving solution is found, the incumbent is updated. To be effective, the features require certains informations that are not provided by all relaxations. Concerning heuristics, for instance, the solution of a linear relaxation can rarely be made feasible, i.e. integer, while it is often possible to recover feasibility from a lagrangian or a combinatorial relaxation, depending on the semantic of the relaxed constraints. A dual relaxation does not even return a relaxed solution, but just a bound. Concerning cost-based filtering, the default probing procedure, which consists in re-solving the relaxation after adding each assignment decision independently, can be employed with any relaxation. However, the procedure can be greatly improved when the relaxation provides the bound estimates for all the assignments at once, as a gradient function. This is the case of linear and lagrangian relaxations with reduced costs. In the context of CP, Focacci et al. [5] proposed to embed in a global constraint an optimization component representing a suitable relaxation of the constraint itself. The framework below is a customizable implementation of this approach. ha l-0 09 76 99 4, v er si on 1 10 A pr 2 01 4 4 A. Malapert, S. Demassey, J.-C. Régin Specifications of the Framework. The framework attends to solve any constraint optimization problem P for which at least one convenient relaxationR exists. W.l.o.g assume that P is a minimization problem min{Z|Z = cost(X), X ∈ C} with C the constraints, X the decision variables, cost the objective function and Z a range variable representing the solution value. R can be stated as min(X∈C′) cost(X) with C′ ⊆ C. At each point of the resolution, the current domains D of variables X define an (optimization) instance of R denoted R(D): min(X∈D∩C′) cost(X). With the upper bound Zmax of variable Z, they define a satisfaction instance of P denoted P(D, Zmax): s ∈ D is a feasible solution of P(D, Zmax) if and only if s ∈ C and cost(s) ≤ Zmax. As in a standard B&B, each time a feasible solution of P(D, Zmax) is reached, i.e. when D becomes a singleton {s}, it is stored as the new incumbent and the search goes on after the maximum value Zmax has been restricted to cost(s)− 1. The framework is built upon a standard CP engine and made of pre-implemented generic components and of required and optional components the user has to provide to solve its own problem P. First, the user adds to the model of P a constraint relaxation(Z, X) whose solutions are (cost(s), s) for all feasible solution s of P(D, Zmax). To ensure this, a propagator must be implemented upon a given abstract template. The minimum implementation requires the code of two primitives: buildRelaxation(D) that builds the instance R(D) from any current domain D of X, and bound(D) that returns the optimal value of this instance. The template is modular in order to be easily customized. The list of primitives, their specifications and default implementations follow: decisionList(D) returns a finite ordered list (D1, . . . , Dp) ⊆ D of decisions to probe. The default is the list of assignments from variables X to values in D in the lexicographic order. probeDecision(Dk, Zmax) builds instance R(Dk) then returns (bound(Dk) > Zmax) as a boolean. By default,R(Dk) is built from scratch using buildRelaxation. pruneDecision(D, Dk) returns a restricted domain D′ with D \Dk ⊆ D′ ⊆ D. filter(D, Zmax) returns the sublist of decisionList(D) of decisions Dk such that probeDecision(Dk, Zmax) is true. propagate(D, Zmax) notifies the propagation engine that: (i) Zmin := max(Zmin,bound(D)) then (ii), if no failure occurs (i.e. if bound(D) ≤ Zmax),D :=pruneDecision(D, Dk) for each decision Dk ∈ D returned by filter(D, Zmax). Hence, in the default implementation of the propagator, all variable-value assignments are probed in turn by, each time, building and solving the relaxation from scratch. Depending on its knowledge of the relaxation, the user can greatly improve this algorithm by overloading one or several primitives independently. For instance, he may redefine decisionList in order to discard from probing some assignments that are known for not changing the relaxed optimum value. The way the decisions are probed in sequence is also crucial in terms of computational complexity. The relaxations can be built and solved, as follows, from the less to the more incremental fashion: (i) by default, for each decision Dk, build R(Dk) then solve it to get the optimum ; (ii) by overloading probeDecision, build R(D) then, for each decision Dk, update R(Dk) then solve it to get the ha l-0 09 76 99 4, v er si on 1 10 A pr 2 01 4 Beyond Cmax: constraint optimization-based scheduling 5 optimum ; (iii) by overloading filter, build R(D) then solve it to get the optimum and a gradient function then, for each decision Dk, get opt+gradient(Dk) Furthermore, the optima of the probed relaxations can be exploited within the branching strategy for guiding the search. Hence, these values and the associated decisions, are stored during the computation of filter, to be queried by the search engine when choosing the next decision to branch, through different primitives such as getBestCostDecision() or getBestRegretDecision(). Finally, most of the time, solving a relaxation R(D) returns the optimal value with an optimal solution. This solution can also be exploited for guiding the search (by assigning a variable to its value in the solution) or directly for pruning the search if the solution is identified as feasible for P. Hence, when possible the user will be interested to define these additional functions: relax(D) returns an optimal solution of R(D) as an instantiation s ∈ D of X if exists, and the empty set, otherwise (or by default); isFeasible(D) returns true iff relax(D) is a feasible solution of P. The default just calls the solution checker of the propagation engine; updateIncumbent(D, Zmax) notifies the search engine of the new solution relax(D) if isFeasible(D) is true and its cost is lower than Zmax (if the cost is Zmin then a backtrack occurs). 2 Application to 1|rj|Lmax The scheduling model that we analyze is as follows. There are n independent jobs J1, . . . , Jn that have to be scheduled without overlapping on a single machine. Each job Jj requires processing during a given uninterrupted time pj ≥ 0, not starting before its release date rj ≥ 0, and being ideally completed before a due date dj ≥ 0. Let Cj denote the completion time of a job Jj , the objective function to minimize is the maximum lateness defined as Lmax = max1≤j≤n(Cj − dj). Basic Constraint Model. CP models of scheduling problems usually represent a non-preemptive job Jj (also called task) by a triplet of non-negative integer variables (sj , pj , ej) denoting the start, processing time and end of the task such that sj + pj = ej . For every ordered pair of tasks Ji and Jj , i < j, we introduce a boolean variable bij standing for the ordering between Ji and Jj . The value of bij is equal to 1 if Ji precedes Jj and to 0 otherwise, i.e. if Jj precedes Ji. The variables si, ei, sj , ej , and bij are linked by a disjunction constraint, on which bounds consistency is maintained, and defined by: disjunction(Ji, Jj , bij) ⇔ (ei ≤ sj ∧ bij = 1) ∨ (ej ≤ si ∧ bij = 0). For n jobs, we must state a quadratic number (n(n − 1)/2) of disjunction constraints. The next constraint imposes that the objective variable Z is equal to the maximal lateness of the tasks and the second next enforces that the makespan T of the schedule is the latest completion time of its tasks. We also state a redundant constraint on the objective variable which imposes that the maximal lateness is greater than the makespan minus the greatest due date. Z = max 1≤j≤n (ej − dj), T = max 1≤j≤n (ej), T − max 1≤j≤n (dj) ≤ Z. ha l-0 09 76 99 4, v er si on 1 10 A pr 2 01 4 6 A. Malapert, S. Demassey, J.-C. Régin Model Reinforcement. The model above is enough, but we can get stronger inference by adding a disjunctive global constraint: disjunctive(〈J1, . . . , Jn〉, T ) (heavy) We can also state a cubic number of boolean clauses which enforce the transitivity of the precedence relations (assuming that bvu denotes 1− buv if u > v): bik = v ∧ bkj = v ⇒ bij = v, 1 ≤ i < j ≤ n, 1 ≤ k ≤ n, v ∈ {0, 1} (clauses) Next constraints break symmetries by ordering pairs of jobs with equal durations. Their correctness can be proven by using simple interchange arguments: (ri ≤ rj) ∧ (pi = pj) ∧ (di ≤ dj) =⇒ bij = 1 1 ≤ i ≤ n, 1 ≤ j ≤ n (order) Cost-based Domain Filtering. We have tested our framework with two wellknown relaxations: 1|rj ; prec; pmtn|Lmax allowing preemption and that can be solved in quadratic time by the modified due date algorithm, and 1|prec|Lmax ignoring the release dates and that can be solved in quadratic time by the Lawler algorithm (see e.g. [3]). Thus, we provide two instances of the template constraint: relaxation[pmtn](Z, b, J) and relaxation[prec](Z, b, J). For both relaxations, we implemented the following primitives: buildRelaxation initializes in O(n2) the precedences (given bij), the release and due dates (given sj and dj); relax executes in O(n2) the corresponding algorithm; probeDecision calls a (≤ O(n2)) updateRelaxation method instead of buildRelaxation; isFeasible checks in O(n) the feasibility of the solution returned by relax, i.e. either the absence of preemption in [pmtn] or the respect of the release dates in [prec]. We also overloaded the default decisionList primitive in order to only test a subset of disjunctions which may actually change the current relaxed solution. We propose two alternatives illustrated in Figure 1: rule swap tries in O(n) to swap only the pairs of jobs with consecutive starting times in the relaxed solution; rule sweep additionally tries in O(n2), for [pmtn] only, to fix disjunctions where a job is preempted by another. Note the modularity of the components since we can state either zero or one or both relaxations in the model. 1 2a 3a 4 3b 2b 5 6 swap
منابع مشابه
AN EFFECTIVE METHOD FOR SIMULTANEOUSLY CONSIDERING TIME-COST TRADE-OFF AND CONSTRAINT RESOURCE SCHEDULING USING NONLINEAR INTEGER FRAMEWORK
Critical Path Method (CPM) is one of the most popular techniques used by construction practitioners for construction project scheduling since the 1950s. Despite its popularity, CPM has a major shortcoming, as it is schedule based on two impractical acceptance that the project deadline is not bounded and that resources are unlimited. The analytical competency and computing capability of CPM thus...
متن کاملMulti-objective scheduling and assembly line balancing with resource constraint and cost uncertainty: A “box” set robust optimization
Assembly lines are flow-oriented production systems that are of great importance in the industrial production of standard, high-volume products and even more recently, they have become commonplace in producing low-volume custom products. The main goal of designers of these lines is to increase the efficiency of the system and therefore, the assembly line balancing to achieve an optimal system i...
متن کاملAn Integrated Model for Storage Location Assignment and Storage/Retrieval Scheduling in AS/RS system
An integrated optimization framework, including location assignment under grouping class-based storage policy and schedule of dual shuttle cranes, is offered by presenting a new optimization programming model. The objective functions, which are considered at this level, are the minimization of total costs and energy consumption. Scheduling of dual shuttle cranes among specified locations, which...
متن کاملA discrete-event optimization framework for mixed-speed train timetabling problem
Railway scheduling is a complex task of rail operators that involves the generation of a conflict-free train timetable. This paper presents a discrete-event simulation-based optimization approach for solving the train timetabling problem to minimize total weighted unplanned stop time in a hybrid single and double track railway networks. The designed simulation model is used as a platform for ge...
متن کاملTrain Scheduling Problem with Consideration of Praying Constraint as an Application of Job Shop Scheduling Problem
The present paper extends the idea of job shop scheduling problem with resting constraints to the train scheduling problem with the Muslim praying considerations. For this purpose, after proposing the new mathematical model, a heuristic algorithm based on the Electromagnetism-Like algorithm (EM) which is well adjusted to scheduling problems is employed to solve the large-size practical cases. T...
متن کاملAn Effective Task Scheduling Framework for Cloud Computing using NSGA-II
Cloud computing is a model for convenient on-demand user’s access to changeable and configurable computing resources such as networks, servers, storage, applications, and services with minimal management of resources and service provider interaction. Task scheduling is regarded as a fundamental issue in cloud computing which aims at distributing the load on the different resources of a distribu...
متن کامل